package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "bi_servpack", schema = "ams", catalog = "")
public class BiServpackEntity {
    private long packid;
    private Long busiid;
    private String packname;
    private String remark;
    private Long chnid;

    @Id
    @Column(name = "packid")
    public long getPackid() {
        return packid;
    }

    public void setPackid(long packid) {
        this.packid = packid;
    }

    @Basic
    @Column(name = "busiid")
    public Long getBusiid() {
        return busiid;
    }

    public void setBusiid(Long busiid) {
        this.busiid = busiid;
    }

    @Basic
    @Column(name = "packname")
    public String getPackname() {
        return packname;
    }

    public void setPackname(String packname) {
        this.packname = packname;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "chnid")
    public Long getChnid() {
        return chnid;
    }

    public void setChnid(Long chnid) {
        this.chnid = chnid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiServpackEntity that = (BiServpackEntity) o;

        if (packid != that.packid) return false;
        if (busiid != null ? !busiid.equals(that.busiid) : that.busiid != null) return false;
        if (packname != null ? !packname.equals(that.packname) : that.packname != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (chnid != null ? !chnid.equals(that.chnid) : that.chnid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (packid ^ (packid >>> 32));
        result = 31 * result + (busiid != null ? busiid.hashCode() : 0);
        result = 31 * result + (packname != null ? packname.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (chnid != null ? chnid.hashCode() : 0);
        return result;
    }
}
